package top.tttfu.entity;


import java.util.Date;

public class Task {
    int id;
    String userAccount = "";
    private   String content ="";
//    private TaskView taskView;
    private Date date;
    private boolean emailPush = false;


    private boolean finished = false;

    public Task(int id, String userAccount, String content, Date date, boolean emailPush, boolean finished) {
        this.id = id;
        this.userAccount = userAccount;
        this.content = content;
        this.date = date;
        this.emailPush = emailPush;
        this.finished = finished;
    }
    public boolean isEmailPush() {
        return emailPush;
    }

    public void setEmailPush(boolean emailPush) {
        this.emailPush = emailPush;
    }

    public boolean isFinished() {
        return finished;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(String userAccount) {
        this.userAccount = userAccount;
    }

    public Task(String content, Date date,User user) {
        this.userAccount = user.getAccount();
        this.content = content;
        this.date = date;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

//    public TaskView getTaskView() {
//        return taskView;
//    }
//
//    public void setTaskView(TaskView taskView) {
//        this.taskView = taskView;
//    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "Task{" +
                "id=" + id +
                ", userAccount='" + userAccount + '\'' +
                ", content='" + content + '\'' +
//                ", taskView=" + taskView +
                ", date=" + date +
                ", emailPush=" + emailPush +
                ", finished=" + finished +
                '}';
    }
}
